Repository navigation
[MRG] Clarify transported mass in partial OT - #902
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #902 +/- ##
=======================================
Coverage 97.09% 97.09%
=======================================
Files 130 130
Lines 27229 27229
=======================================
Hits 26437 26437
Misses 792 792 🚀 New features to boost your workflow:
|
rflamary
left a comment
There was a problem hiding this comment.
Thanks for the PR @JaylenTang , I have some suggestions below about shortening the user guide and about the new info in the exmaple.
| application, or validation suited to that application, can inform the choice. | ||
| Inspecting several feasible masses helps show the consequences of that choice. | ||
|
|
||
| The :ref:`2D partial Wasserstein example |
There was a problem hiding this comment.
this discussion is interesting but much too detailed for a user's guide. you can eitehr move it to the exmaple file where it makes more sens or remove it. only keep a sentence with areference to the example please.
There was a problem hiding this comment.
Hi @rflamary, I’ll shorten the user guide and keep the detailed explanation in the example.
There was a problem hiding this comment.
I shortened this to one sentence linking to the example and kept the explanation in the example.
| ) | ||
|
|
||
| print("\nExact partial Wasserstein mass study (raw transport costs):") | ||
| print(" m cost source in source out target in target out any out") |
There was a problem hiding this comment.
names are unclear please dont' use in and out that can mean source/target in OT but inlier outlier possibly . Actually it would porably be more clear with aplot (and maybe more valyues of m?) where you can have larger legends for the plots
There was a problem hiding this comment.
I’ll also use plots with clearer labels and larger legends, and include a few more values of m.
There was a problem hiding this comment.
I removed the in/out table and updated the source and target bar plots with full group names and a larger legend. The example now compares eight values of m on the same samples.
|
Hi @rflamary, just following up on the changes I pushed last week. I shortened the guide and updated the plots as you suggested. When you have a chance, could you take another look? Thanks! |
Types of changes
Documentation and example update.
Motivation and context / Related issue
Related to #890.
I extended the existing 2D partial Wasserstein example to make the meaning of
mclearer. It explains absolute mass, point counts, and the fractions used when the input totals differ.I shortened the added discussion in the user guide to one sentence linking to the example. I removed the in/out table and updated the source and target bar plots with full group names and a larger legend. The example now compares eight values of
mon the same samples. The four transport-plan panels are still shown form=0.25,0.5,0.75, and1.I kept the original sampling structure, Euclidean costs and existing solvers, and added a local fixed seed for reproducibility. The original entropic and Gromov-Wasserstein sections and attribution are still there. The example checks transported mass, marginal limits and the balanced endpoint when both totals are one. The bars show how much mass each group contributes, not whether individual points are correctly matched.
How has this been tested (if it applies)
Checked locally on Python 3.12 with the NumPy CPU backend after syncing the PR branch to
dc79138:PR checklist